﻿<!-- #include file="../Include/Admin_Onlogin.asp" -->
<%
Response.Write "<!DOCTYPE html>" & vbCrLf
Response.Write "<head>" & vbCrLf
Response.Write "<title>生成导页管理</title>" & vbCrlf
Response.Write "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'>" & vbCrLf
Response.Write "<meta name='viewport' content='width=device-width, initial-scale=1, maximum-scale=1'>" & vbCrLf
Response.Write "<meta name='apple-mobile-web-app-status-bar-style' content='black'>" & vbCrLf
Response.Write "<meta name='apple-mobile-web-app-capable' content='yes'>" & vbCrLf
Response.Write "<meta name='format-detection' content='telephone=no'>" & vbCrLf
Response.Write "<link href='../Plugins/layui/css/layui.css' rel='stylesheet' type='text/css' />" & vbCrLf
Response.Write "<link rel=""stylesheet"" href=""../Style/global.css"" media=""all"">" & vbCrLf
Response.Write "<link rel=""stylesheet"" href=""../Style/font.css"" media=""all"">" & vbCrLf
Response.Write "<script type='text/javascript'>" & vbCrLf
Response.Write "var pc_file = '" & InstallDir & "';" & vbCrLf
Response.Write "var admin_file = '" & AdminFolder & "/';" & vbCrLf
Response.Write "</script>" & vbCrLf
Response.Write "<script type='text/javascript' src='../Js/Admin.js'></script>" & vbCrLf
Response.Write "<script type='text/javascript' src='../../Dialog/main.js'></script>" & vbCrLf
Response.Write "<script type='text/javascript' src='../../Dialog/lhgcore.min.js'></script>" & vbCrLf
Response.Write "<script type='text/javascript' src='../../Dialog/lhgcalendar.min.js'></script>" & vbCrLf
Response.Write "</head>" & vbCrlf
Response.Write "<body>" & vbCrlf
Response.Write "<div class=""admin-main layui-anim layui-anim-upbit"">" & vbCrlf
If Not Web_IsCreatIndex = True Then
	Response.Write "<script type='text/javascript'>Dialog.alert('对不起~！当前网站导页没开通生成HTML功能，请先在配制管理中打开导页HTML生成功能！',function(){parent.tab.getdeleteTab();});</script>"
	Response.End()
End If

Dim FilePath,p
p=2
Response.Write("<div id=""prompt""><ul>")
progress_init
progress int(1/p*100),"读取导页数据,开始生成导页..."
CreateSiteIndex
If IsConn = False Then Call CloseConn()
progress int(p/p*100),"<a href='" & FilePath & "' target='_blank'>生成导页（HTML）完成</a> "
Response.Write "<b>恭喜您！网站导页（HTML）生成完毕,请返回进行其它操作!</b><br>总费时：<font color=""#FF0000"">"& FormatNumber((timer()-BeginTime), 2,-1) & "</font>秒,完成时间" & Now()
Response.Write("</ul></div>")

Public Function CreateSiteIndex()
	HtmlContent = Html.SiteIndex(True)
	FilePath = InstallDir & Web_IndexFile
	WriteTOFile FilePath,HtmlContent
	HtmlContent = ""
End Function
Response.Write "</div>" & vbCrlf
Response.Write "<script type='text/javascript'>Dialog.alert('生成完毕！',function(){parent.tab.getdeleteTab();});</script>"
Response.Write "</body>" & vbCrlf
Response.Write "</html>" & vbCrlf
%>